<% content_for :foot_scripts do%>
<%= tinymce :height => 300 %>
<% end %>
<div class="container">
	<div class="tabbable tabs-left" id="admin_bar">
		<%= render 'shared/admin_bar'%>
		<div class="tab-content">
			<h1> <%= t 'dich_san_pham___sang_tieng___', :ten_sp => @san_pham.noi_dung('vi', true).tieu_de, :nn => APP_CONFIG['ngon_ngu'][params[:ngon_ngu]]['ten']%> </h1>
			<% if flash.now[:loi].present? %>
			<p class="alert alert-error">
				<%= flash.now[:loi]%>
			</p>
			<% else %>
			<% if flash.now[:thanh_cong].present? %>
			<p class="alert alert-success">
				<%= flash.now[:thanh_cong]%>
			</p>
			<% end %>
			<% end %>

			<div id="da_dich">
				<div class="row-fluid">
					<div class="span8">
						<span><%= t'cac_ngon_ngu_da_dich'%></span>
						<% for noi_dung in @san_pham.noi_dung_san_phams%>
						<span class="ten_ngon_ngu"><a href="<%= url_for :action=>"ban_dich", :uid => params[:uid], :ngon_ngu => noi_dung.ngon_ngu%>"><%= APP_CONFIG['ngon_ngu'][noi_dung.ngon_ngu]['ten']%></a></span>
						<% end %>
					</div>
					<div class="span4 text-right">
						<a class="btn" href="<%= url_for :action=>'cap_nhat', :uid => params[:uid]%>"><%= t 'sua_san_pham'%></a>
					</div>
				</div>
			</div>
			<%= form_tag request.url, :id=> 'tao_san_pham', :class=> "tao_html" do %>
			<p>
				<%= label_tag :tieu_de, t("ten_san_pham") %>
				<%= text_field_tag :tieu_de, (params[:tieu_de].present? ? params[:tieu_de] : (@ban_dich.present? ? @ban_dich.tieu_de : "")), :class => "tieu_de_slug"%>
			</p>
			<div>
				<%= label_tag :noi_dung, t('mieu_ta_san_pham') %>
				<p>
					<a href="<%= admin_anh_duoc_upload_path %>" class="btn btn-small" target="_blank"><%= t'cac_anh_da_upload'%></a>
					<a href="<%= url_for :action=>"upload", :controller => "main"%>" class="btn btn-small" target="_blank"><%= t 'upload_anh_moi'%></a>
				</p>
				<%= text_area_tag :noi_dung, (params[:noi_dung].present? ? params[:noi_dung] : (@ban_dich.present? ? @ban_dich.noi_dung : "")), :class => "tinymce", :rows => 40, :cols => 120 %>
			</div>
			<p >
				<%= submit_tag t('luu_ban_dich'), :class=>"btn btn-large btn-primary" %>
			</p>
			<% end %>
		</div>
	</div>
</div>
